专利摘要:
The description relates in particular to methods of authentication of binary code stored in a smart card. The description also relates to systems and a computer program capable of implementing such methods, as well as storage media comprising such a computer program.
公开号:FR3015078A1
申请号:FR1362677
申请日:2013-12-16
公开日:2015-06-19
发明作者:Cyrille Pepin;Johann Urvoy
申请人:Morpho SA;
IPC主号:
专利说明:

[0001] BINARY CODE AUTHENTICATION The application concerns in particular the securing and authentication of a code stored in a smart card.
[0002] There are many known techniques for ensuring that a code stored in a smart card is genuine. Some have been standardized. This is particularly the case for the applet signature techniques (in particular java) specified by the GlobalPlatform consortium on the basis of the so-called Open Platform specification of VISA Inc. However, these techniques do not necessarily make it easy to authenticate. a binary code loaded into a smart card by an administrator of the card. It is also known to transmit to the smart card a GetData command retrieving a version number of the code. But if an attacker succeeds in modifying the version number and / or the code (the coherence of the two being not verified by the smart card), this technique does not constitute a guarantee of the authenticity of the code. It is also known to calculate a CRC of the code. However, this CRC is computed only on the binary code, regardless of the source code.
[0003] The invention aims to improve the situation. One aspect of the invention relates to a method of securely storing a binary code in a smart card, comprising: / a / computing, by a secure storage system, a first hash from a source code said source code corresponding to the binary code; / b / storing, by the secure storage system, the first hash and the binary code in the smart card; / c / the transmission, by the secure storage system to an authentication system, a random number and a third hash, the third hash being calculated from a concatenation of the first hash, a second hash and the random number, the second hash being calculated from the binary code.
[0004] This secure storage method is advantageous in that it allows in particular a chip card provider to provide increased assurance of the authenticity of a binary code that it has stored in a smart card. This may also apply to smart card vendor partners developing smart card applications, or providing smart card personalization services (these services include loading applications into the smart card). The binary code of such applications can thus be verified. A person authorized to verify the authenticity of the binary code can easily perform a verification by comparing the third hash to a third hash recalculated with information from the smart card. One aspect of the invention relates to a method of authenticating a binary code stored in a smart card, comprising: / d / obtaining, by an authentication system, a third reference hash; / e / obtaining, by the authentication system, a third effective hash from a concatenation of a first hash, a second hash and a random number, the first hash being stored in the smart card, the second hash being calculated from the binary code to be authenticated; / f / authentication, by the authentication system, of the binary code on the basis of a comparison of a third reference hash and the third effective hash. The authentication method allows for example an authorized person to verify that the content of the card is consistent with what it is supposed to be.
[0005] The authorized person may belong for example to an evaluation laboratory (such as an CESTI). For example, an evaluation laboratory may be an entity certifying the compliance of a smart card at a certain level (for example EAL5) of the common criteria (ISO / IEC 15408), or at a certain level ITSEC (standard obsolete but still sometimes used in France). The evaluation laboratory may also be, by way of non-limiting example, an entity in charge of a Visa or MasterCard certification (necessary to be able to produce these types of bank cards). It may also be more generally any certification, it controls the security and / or compliance with more general requirements (including purely functional) of a given market (bank cards, cell phone cards such as SIM cards or USIM, health cards, driver's license cards, electronic ID cards, etc.). The method can also be implemented by technical support teams. An end user of a smart card, or a developer of applications for smart cards, can indeed encounter a difficulty justifying sending a smart card to a technical support service of the supplier of the smart card in question. This technical support service (or any other person authorized to access the information necessary to verify the authenticity of a binary code) can ensure, in a simple way (thanks to the invention), the authenticity of the protected binary codes. according to the embodiments described. Another aspect of the invention relates to a computer program comprising sequences of instructions implementing the steps of a method according to the preceding aspects of the invention when they are executed by processors. Another aspect of the invention relates to non-transitory computer readable storage media comprising a computer program according to the preceding aspect of the invention.
[0006] Another aspect of the invention relates to a secure storage system, the secure storage system being arranged to calculate a first hash from a source code, said source code corresponding to a binary code; the secure storage system being arranged to store the first hash and the binary code in the smart card; the secure storage system being arranged to transmit to an authentication system a random number and a third hash, the third hash being calculated from a concatenation of the first hash, a second hash and the random number, the second hash being calculated from the binary code. This secure storage system is advantageous in that it allows the implementation of a method for securely storing a binary code in a smart card according to one aspect of the invention. Another aspect of the invention relates to an authentication system for authentication of a binary code stored in a smart card, the authentication system being arranged to obtain a third reference hash; the authentication system being arranged to obtain a third effective hash from a concatenation of a first hash, a second hash and a random number, the first hash being stored in the smart card, the second hash being calculated from the binary code to be authenticated; the authentication system being arranged to authenticate the binary code on the basis of a comparison of a third reference hash and the third effective hash. This authentication system is advantageous in that it allows the implementation of a method for authenticating a binary code stored in a smart card according to one aspect of the invention. Other aspects, objects and advantages of the invention will appear in a non-limiting manner on reading the description of some of its embodiments. The invention will also be better understood with the aid of the drawings, in which: FIG. 1 illustrates a system for securing an SC chip card comprising an S_SYS secure storage system and an A_SYS authentication system; FIG. 2 illustrates various steps of a method according to one embodiment of the invention; - Figure 3 illustrates different steps of a method according to another embodiment of the invention.
[0007] FIG. 1 illustrates a system for securing an SC smart card comprising an S_SYS secure storage system implemented by a personalization system, and an A_SYS authentication system implemented by a test system.
[0008] The customization system, which can be installed in a factory, includes a piece of furniture topped with a CTR_SC control screen. The personalization system includes a loading column LD_SC of smart cards, represented filled to two-thirds of blank smart cards. A chip card SC extracted from the load column LD_SC is transported by means of a treadmill CV_BLT to a PRS electrical personalization module, and, once the electrical customization is done, to a stacking column OUT (in which custom cards are stored). The electric personalization module PRS is connected by a secure link (not shown) to a development environment (not shown) and by another secure link (not shown) to the authentication system A_SYS. This PRS electrical personalization module is arranged to receive, from the development environment, a first hash of a source code (alternatively, the PRS electrical personalization module is arranged to receive, from the development environment, the source code proper and to calculate the hash, called first hash). The electric personalization module PRS is arranged to record in the smart card SC this first hash. The personalization module PRS is arranged to receive, from the development environment, a binary code corresponding to a compiled version of the source code, and to record this binary code in the smart card SC. The electric personalization module PRS is also arranged to calculate a second hash equal to the hash of the binary code, to generate a random number, and to calculate a third hash equal to the hash of a concatenation of the first hash, the second hash and the number random. The electric personalization module PRS is arranged to transmit the third hash and the random number to the authentication system (via the secure link). The authentication system A_SYS implemented by a test system comprises a table on which are placed a central unit SU (associated with a screen not shown), a test machine TST connected to the central unit SU, a KBD keyboard connected to the central processing unit SU, and an RDR card reader connected to the TST test machine. The smart card SC electrically customized by the electric personalization module PRS is now connected in the card reader RDR, which can be a card reader contact or contactless type (it is a reader type contact which is represented on Figure 1). Before performing the required diagnostics, it is proposed to verify that the binary code that will be diagnosed is the correct one. To this end, the test machine TST, connected by the secure link to the electrical personalization module PRS via the central unit SU, obtains the third hash and the random number. It then asks the smart card SC (via the RDR reader) to calculate the third hash on the basis of the first hash and the binary code stored in the smart card SC, and the random number received. The smart card SC responds by returning the third effective hash. If it is equal to the third received hash, the authentication of the binary code is pronounced.
[0009] According to one possible implementation, the secure storage system S_SYS (for example its personalization module PRS) transmits the second hash and the binary code to the authentication system A_SYS. The A_SYS authentication system is thus able to recalculate this second hash. From the first hash, the second hash and the random number, the authentication system A_SYS calculates a third hash. The smart card has (stores) the first hash.
[0010] The A_SYS authentication system has the second hash (and is able to recalculate it). It also has the third hash and the corresponding random number and can recover the first hash (stored in the smart card) if the smart card authorizes it. This third hash provided to the authentication system A_SYS makes it possible to establish the non-modification of the binary code and its authenticity. The A_SYS authentication system is able to recalculate and verify this third hash. The A_SYS authentication system asks the smart card to calculate a hash based on the following elements: first hash, second hash and random number. The smart card returns (if it is authentic) the third known hash of the A_SYS authentication system. To ensure that the smart card performs a real calculation, the A_SYS authentication system modifies the random number (replaces it with another random number), recalculates a third hash after recovering the first hash, and compares the result with a third hash that the smart card 25 calculates on the basis of the elements that are provided to it according to a procedure as described in the previous paragraph (with the modified random number). FIG. 2 illustrates the calculation of a third reference hash by a secure storage system according to a possible embodiment of the invention.
[0011] A first operation consists of calculating the first R_H1 hash of an O_SRC source code. A second operation consists in calculating the second R_H2 hash of an O_EXE binary code corresponding to the O_SRC source code. A third operation consists of generating a random number P_RND. These three operations can be performed in an arbitrary order, or even performed in parallel if the architecture of the secure storage system allows (for example if it is a multitasking system). Finally, a third hash R_H3 is calculated by applying a hashing algorithm to a concatenation of the first hash R_H1, the second hash R H2, and random number RND. FIG. 3 illustrates the computation of a third effective hash by an authentication system according to a possible embodiment of the invention, and its comparison with a third reference hash for authentication purposes.
[0012] At the request of the authentication system, a chip card storing an SC EXE binary code whose authenticity is to be verified calculates a second E_H2 hash of this binary code. The authentication system transmits an RND number to the smart card (before or after calculating the second E_H2 hash, or even for a multitasking smart card, which is not common). The smart card then determines a concatenation of a first hash that it has previously stored, the second hash E_H2 it has just calculated and the number RND, then calculates a third hash E_H3 of this concatenation. The concatenation is performed in an arbitrary order but agreed in advance (corresponding to that used for the calculation of a third reference hash R_H3). The smart card returns this third hash E_H3 to the authentication system. The authentication system compares this third hash E H3 with a third reference hash R H3. If the two hash _ _ are equal, the binary code EXE_SC is authenticated.
[0013] Possible variants are described below. According to a first embodiment, a method of securely storing an O_EXE binary code (official executable) in an SC smart card, comprises the calculation, by a secure storage system S_SYS, of a first R_H1 hash from a source code O_SRC (official source code), said source code corresponding to the O_EXE binary code. Thus, the O_EXE binary code can be the result of the compilation of the O_SRC source code. The secure storage method includes storing, by the secure storage system S_SYS, the first hash R_H1 and the binary code O_EXE in the smart card SC. These two secure storage are advantageously performed during the same session (for example consecutively). They can be stored in different areas of the smart card (the first hash can be stored for example in a secure area, while the binary code may be stored in a less secure area if necessary). The smart card links the respective records of the first hash and the executable code. For example, it places these two records contiguously (which may assume that they are placed in the same memory zone - for example in a secure memory zone), or it associates them each with the same index (common), or it associates each record with a pointer to the other record.
[0014] The secure storage method also comprises the transmission, by the secure storage system S_SYS to a SYS authentication system A, of a random number P RND and a third hash R H3, the third hash R _H3 being calculated to from a concatenation of the first hash R_H1, a second hash R H2 and the random number P RND, the _ _ second hash R _H2 being calculated from the binary code O_EXE. The concatenation of the first hash, the second hash and the random number can be done in any order, provided that the same order is used in the subsequent verification. According to one possible implementation of the first embodiment, the source code is a code in C language. It can also be an assembly language, or a Java language, or any other language (Multos language, C # language). .NET, etc.). According to one possible implementation of the first embodiment, the source code takes the form of one or more text files. Text files can be in ASCII format, in UNICODE format (UTF-8, UTF-16, etc.), or in any other appropriate text format. According to an alternative embodiment, the source file can also include resources (metadata such as images, sounds, error messages, etc.) and can be compressed to occupy less space (for example in the form of a .JAR file for Java applets). According to one possible implementation of the first embodiment, when the source code is distributed between several source files (which may be text files or any more complex files such as the aforementioned .JAR files), the calculation of the first hash s operates after having previously concatenated the contents of these source files (thus excluding any data other than the content, such as the set of file headers, etc.). The concatenation can be done in the alphabetical order of the name of the source files. This alphabetical order can use if necessary the path of each source file if it is possible (in the considered environment) that source files located at different places have the same name. Of course any other order can be adopted by convention. It matters only that the same convention is adopted by the different parties who have legitimately calculated this first hash. Other implementations are possible. As an alternative, it is for example possible to take account of headers and file names when calculating the hash (concatenating not only the content of the files but also the headers). It is also possible, for example, to compress all the source files composing the source code O_SRC within a file (for example a ZIP file), and to calculate the hash of the resulting compressed file. This assumes that two separate compressions of the same file lead to the same compressed file (the compression algorithm must be deterministic, and the compressed file must not include elements that may fluctuate, such as the date and time at which compression has been performed). The O_EXE binary code can be a file of type .hex, .cap, etc.
[0015] According to a possible implementation of the first embodiment, the first, second and third hashs R_H1, R_H2 and R_H3 are calculated with the same hash algorithm (for example SHA-1, SHA-256, RIPEMD-160, MD5 , or any other algorithm appropriate for the intended application which may even include cryptographically very weak hashes such as, for example, a CRC algorithm such as CRC-8, CRC-16, CRC-32 or CRC-64). Codes deemed cryptographically safe (such as, at the present time, SHA-1 or SHA-256) are advantageous. Of course, it would be possible alternatively to use different hashing algorithms to calculate each of the hashes (or for some of them only - for example SHA-1 for the first hash and SHA-256 for the second one). and third hashes). The random number P_RND is a predetermined random number, in the sense that it is determined randomly during an initial phase (by the secure storage system S_SYS), and no longer varies during subsequent authentication operations. According to one possible implementation of the first embodiment, the random number P_RND is generated by the secure storage system S SYS itself. According to an alternative implementation of the first embodiment, it is the smart card SC which generates the random number P_RND on request of the secure storage system S_SYS and (optionally) transmits it to the secure storage system S_SYS. Thus, the secure storage system S_SYS can simply send a generation (and possibly storage) command of the random number P_RND to the smart card, which can respond, after having generated the random number P_RND, either by transmitting to the system of secure storage this random number P_RND, either by storing this random number P_RND in its (or one of its) memory (s), or both (storage and transmission to the secure storage system). This can be advantageous especially when the smart card comprises a cryptoprocessor equipped with a more secure random number generator than the random number generator of the secure storage system (that is to say able to generate a random number P_RND less predictable). According to a second embodiment, a secure storage method according to the first embodiment comprises storing, by the secure storage system S_SYS, the random number P_RND in the smart card SC. As has been previously stated, it is even possible that it is the smart card SC itself that has generated the random number P_RND on behalf of the secure storage system S_SYS, in which case this storage can be performed without even the Secure storage system never has direct access to the random number P_RND generated (which can increase security, in certain circumstances, and especially when this storage in the SC smart card is highly secure). In the case of generation by the smart card SC of the random number P_RND, the storage, by the secure storage system S_SYS, of the random number P_RND in the smart card SC is understood as the instruction given by the system secure storage S_SYS to the smart card SC, generate and store the random number P_RND. The transmission, by the secure storage system S_SYS to an authentication system A_SYS, the random number P_RND can then be performed via the smart card SC. This form of transmission is either cumulative or alternative with a direct transmission (without going through the smart card SC) of the random number by the secure storage system S_SYS to the authentication system A_SYS.
[0016] According to a third embodiment, a secure storage method according to the first or second embodiment comprises the storage in the smart card SC, by the secure storage system S_SYS, of at least one of the second hash R_H2 and the third hash R_H3. The storage of the second R_H2 hash in the smart card allows for example the smart card to check (when it determines, according to a given security policy, that it is necessary, or when it is requested by an external entity ) that the corresponding binary code (which it contains) is unchanged by recalculating its hash and comparing it to R_H2. According to an alternative, the storage of the second hash R_H2, if it is secure, and if the storage of the binary code is also secure, allows if necessary not to have to recalculate the hash of the stored binary code, and simply use the stored value R_H2. An attacker wishing to use a false binary code (and not having access to the original binary code or its hash R_H2) is not able to emulate R_H2, which in general does not need to leave the map SC chip (which can only be used for intermediate calculations and / or for internal checks). In case of storing the third R_H3 hash in the smart card, the transmission, by the S_SYS secure storage system to a SYS authentication system, of the third R_H3 hash can be performed via the smart card. SC. According to one possible implementation of the third embodiment, this form of transmission is cumulative with a direct transmission (that is to say without going through the SC smart card) of the third hash R_H3 by the secure storage system S_SYS to the A_SYS authentication system. According to another possible implementation of the third embodiment, this form of transmission is alternative (that is to say that the transmission via the smart card SC can replace a direct transmission). According to a fourth embodiment, a method for authenticating an EXE_SC binary code stored in a chip card SC comprises obtaining, by an authentication system A_SYS, a third reference hash R_H3. The fact that this third R_H3 hash is qualified by the adjective "third" does not prejudge its order of obtaining compared to other possible hashes, but is only a means of naming it (and so of the distinguish from other hashes).
[0017] This obtaining is done in a secure manner. This is for example a obtaining performed during a so-called upstream phase (for example during an electrical customization of the smart card by a chip card manufacturer), that is to say before deployment from the smart card to its end user (cardholder) or intermediary (certification body, B2B customer such as a bank or a telephone operator, etc.). This secure obtaining can be done by secure communication (for example through a secure Internet communication via SSL or VPN, or through a channel called "secure channel" specified by GlobalPlatform) of the third reference hash R_H3 between entities being done trust. The authentication system A_SYS can thus (in particular) obtain the third reference hash R_H3 from a secure storage system S_SYS or from the smart card SC itself. It should be noted that a smart card may have multiple applications, some of which may be secure, others may not be secure (or less secure), and it may be useful, for example, to want to ensure the authenticity of the binary code of a weakly secure application, using a secure application. A secure application can thus serve as a storage entity (and / or calculation) of different hashes required according to different embodiments of the invention. According to the fourth embodiment, the method comprises obtaining, by the authentication system A_SYS, a third effective hash E_H3 from a concatenation of a first hash R_H1, a second hash E_H2 and d a random number RND, the first hash R_H1 being stored in the smart card SC, the second hash E_H2 being calculated from the EXE _SC binary code to authenticate. For example, the authentication system A_SYS may ask the smart card SC to recalculate the third effective hash E_H3. According to one possible implementation, the second hash E H2 is a _ _ second effective hash recalculated each time it is necessary, on the basis of the actual content (at the moment considered) of the EXE _SC binary code to be authenticated. Thus, if this binary code EXE_SC is modified, the second hash E_H2 is modified. It is conceivable, according to some implementations, that the smart card is able to ensure (by other means) that the EXE _SC binary code to be authenticated is not modifiable by an attacker. In such a case, and for these implementations only, it is possible to store in the smart card SC (securely) a second hash E_H2 once and for all and not to recalculate each time. This speeds up processing, and does not really provide additional security (security is in this case guaranteed by another mechanism), but allows increased interoperability of executable code authentication (between different types of smart cards, or between the same custom smart cards differently). It is even possible, in such a case, to directly store the third effective hash E_H3 for a certain random number (in particular for a predetermined random number P_RND), so that when the authentication is requested on the basis of this specific random number, it is accelerated (no recalculation). In order to avoid opening a security breach by time attack ("timing attack"), it is preferable to use this optimization only when the request to obtain E_H3 received by the card specifies (by identifying it, but without transmitting it) that it is a predetermined random value P_RND (known in advance of the smart card SC) to be used. In other words, if a request function for obtaining E_H3 (implemented by the smart card SC on behalf of the authentication system A_SYS) takes as parameter a random number to be used by the smart card SC (and not not simply an explicit or implicit reference to a predetermined random number that is pre-stored in the smart card SC), it is generally not safe from the point of view of optimizing this function by testing whether this random number passed in parameter is equal to a pre-stored random number, and in this hypothesis to accelerate the processing by directly returning a corresponding pre-stored result (E_H3). Indeed, such optimization (speed of execution) could allow an attacker to guess the predetermined random number (if not too long) by exhaustive test, or, regardless of the length of this random number, to check if a given number presumed to be potentially the predetermined random number is actually (by comparison of the calculation time of E_H3 with the calculation time for any random number). The method comprises authenticating the A_SYS authentication system with EXE _SC binary code based on a comparison of a third reference hash R_H3 and the third effective hash E H3. Thus, if _ _ the relevant third reference hash R_H3 and the third effective hash E_H3 (supposed to correspond to it) are equal, the method considers that the binary code EXE _SC is authentic. The third reference hash R_H3 is distinct from (but, in the absence of fraud, equal to) the third effective hash E_H3. Similarly, the second reference hash R _H2 is distinct from (but, in the absence of fraud, equal to) the second effective hash E H2.
[0018] Calculating the third effective hash E_H3 in the SC smart card is advantageous in that it avoids leaving a genuine authentic SC card the second authentic E_H2 hash (case of a chip card SC storing an authentic binary code). Moreover, in the case where the random number used is a predetermined random number P_RND known in advance of the smart card SC, this also avoids taking out the first hash R_H1 of the smart card to recalculate a third reference hash R_H3. Using a predetermined random number P_RND (that is to say, generated randomly during an initial phase but then unchanged during successive authentications) may nevertheless (under certain circumstances) present a replay risk (in case of interception by an attacker). According to one possible implementation of the fourth embodiment, the comparison of the third reference hash R_H3 and the third effective hash is performed by the authentication system A_SYS. However, according to one possible variant, the comparison can be carried out by the smart card SC itself, which must then implement a secure means of informing the authentication system A_SYS of the result (it would otherwise be possible to perform a pirated smart card always answering that the authentication is correct). Obtaining, by an authentication system A_SYS, a third reference hash R_H3 does not exclude the obtaining of several third hashs of reference. According to a possible implementation of the fourth embodiment, a single third reference hash R_H3 is obtained. According to another possible implementation of the fourth embodiment, several (for example two) third reference hashs R_H3 are obtained. According to one possible implementation of the fourth embodiment, the authentication system A_SYS obtains a third reference hash R_H3 by receiving it (it can for example receive it from a secure storage system S_SYS, possibly via the SC smart card as discussed above). It is thus possible to obtain a first third reference hash (for example a first third reference hash calculated using a predetermined random number P_RND, and transmitted by a secure storage system S_SYS to the authentication system A_SYS. ). The authentication system A_SYS can also obtain (in addition to the first third aforementioned reference hash) a second third reference hash calculated using a random number RND generated for example by the authentication system itself. The first third reference hash can be used for example in the context of a so-called "static" authentication (based on a predetermined random number P_RND, which is defined in advance by a third party entity to the authentication system A_SYS) while the second third reference hash can be used for example in the context of a so-called "dynamic" authentication (based on a random number RND defined at each authentication attempt by the authentication system A_SYS itself, and thus avoiding the replay of a third reference hash that could have been intercepted beforehand by an attacker). It is also possible to perform a double authentication (involving two comparisons), one static and the other dynamic.
[0019] According to a fifth embodiment, an authentication method according to the fourth embodiment comprises the transmission of the random number RND by the authentication system A_SYS to the smart card SC. This is advantageous because it allows the calculation of the third effective hash E H3 by the smart card SC for any random number (and in particular a random number chosen by the authentication system A_SYS itself), thus avoiding certain attacks.
[0020] It is thus possible to set up in the smart card SC an effective third hash calculation command, one of the input parameters of which is the random number. For example, for a smart card implementing a protocol called T = 0 (standardized in the ISO 7816 standard), or for the T = CL protocol (standardized in the ISO 14443 standard) an APDU command may comprise a parameter said P3 (in the protocol T = 0) corresponding to the length of the random number (if the random number is transmitted) and to zero otherwise. In case P3 would be zero, the card can use a predetermined random number P_RND stored in the card. As indicated above, if a random number is transmitted as an input parameter, it is advantageous not to check whether the random number received by the card corresponds to a predetermined random number P_RND already stored in the card, or at least if this check is nonetheless performed, not to perform an optimized processing allowing an attacker to guess whether the input parameter corresponds to a predetermined random number (for example by means of a time attack). On the other hand, optimized processing is possible if P3 is zero (in this case, it is known by construction that the random number used is a predetermined random number). According to a sixth embodiment, the random number RND of a secure storage method according to the fourth or fifth embodiment is a predetermined random number P_RND received by the authentication system A_SYS (allowing a static authentication such as 25 described above). Obtaining, by the authentication system A_SYS, the third reference hash R_H3 then comprises (or consists of) the reception, by the authentication system A_SYS, the third reference hash R_H3. Thus, this third reference hash R_H3 does not need to be recalculated by the A_SYS authentication system, but can simply be received (securely). It can be received directly or indirectly. For example, the predetermined random number P_RND may be generated by the smart card SC (for example during its initial electrical customization by a smart card manufacturer). It can also be generated by an S_SYS secure storage system. In the latter case, the predetermined random number P_RND generated by the secure storage system S_SYS can be either directly transmitted by the secure storage system S_SYS to the authentication system A_SYS (for example via a telecommunications network, such as the Internet, but preferably using a secure protocol such as an IPSEC VPN, or via SSL), is transmitted indirectly, for example by being stored in the smart card SC by the secure storage system S_SYS and then read by the authentication system A_SYS from the smart card SC. Similarly, the third random reference number R_H3 can be transmitted directly or indirectly (for example via the smart card SC) from the secure storage system S_SYS to the authentication system A_SYS. According to one possible implementation, a direct transmission of the predetermined random number P_RND (respectively of the third reference hash R_H3) is combined with a storage of the predetermined random number P_RND (respectively of the third reference hash R_H3) in the smart card SC. The authentication system A_SYS can thus obtain the predetermined random number P_RND (respectively the third reference hash R_H3) in several ways (direct reception and reception from the smart card SC), in order to verify that the data received are the same independently the method of obtaining used. According to another possible implementation, a direct transmission of the predetermined random number P_RND (respectively of the third reference hash R_H3) excludes any storage of the predetermined random number P_RND (respectively of the third reference hash R_H3) in the smart card SC. According to a seventh embodiment, the random number RND of a secure storage method according to the fourth or fifth embodiment comprises a choice of the random number RND by the authentication system A_SYS and the reading of the first hash R_H1 stored in the smart card SC by the authentication system A_SYS. Obtaining, by the authentication system A_SYS, the third reference hash R_H3 comprises (or consists in doing) the calculation of the third reference hash R_H3 by the authentication system A_SYS. The A_SYS authentication system is supposed to have the binary code which it wants to verify the authenticity and can therefore recalculate the hash R_H2. Alternatively (or cumulatively), it can obtain R_H2 (preferably in a secure manner, similar to what can be done for R_H3). Advantageously, the reading by the authentication system A_SYS of the first hash R_H1 from the smart card is secure. Indeed, this first R_H1 hash is sensitive information that could facilitate an attack by a third party. The security can rely on a secure channel of the type specified in the de facto GlobalPlatform standard mentioned above. It is advantageous to subordinate the reading of the first hash R_H1 to the knowledge of a secret other than a PIN user code, because this type of information (first hash R_H1) is in principle not intended to be accessible to the user. final user of the smart card SC (conventional PIN code holder), but rather to an administrator or intermediate user (telecommunications operator, bank, etc.) of the smart card. However, it is possible, for example, to provide a dedicated PIN code (distinct from the PIN user code) to protect access to the first hash R_H1. According to an eighth embodiment, a method for securing an SC smart card comprises a secure storage method according to one of the first to third embodiments, and an authentication method according to one of the fourth to the seventh embodiment. embodiments. The secure storage method thus serves as a prerequisite for the subsequent authentication method. According to a ninth embodiment, a computer program comprises instruction sequences implementing the steps of the method according to one of the first to the eighth embodiments when executed by processors. This program can be composed of sub-programs. For example, the program may include a sub-program in assembler language (or in C, java, .NET or Multos) executed by a processor of the smart card SC in order, in particular, to allow the smart card to receive the first hash. R_H1 and store it, calculate a second hash E_H2, calculate a hash E_H3, or more generally perform any step (embodiments of above) that is the responsibility of the smart card (or that can be performed optionally by the Smartcard). The program may also include a sub-program in C ++ language (or in Visual Basic language, Java, etc.) executed by a processor (or several processors) of the secure storage system in order to perform any step (of the aforementioned embodiments ) that is the responsibility of the secure storage system (or that can be optionally performed by the secure storage system). The program may also include a sub-program in C ++ language (or in Visual Basic language, Java, etc.) executed by a processor (or several processors) of the authentication system in order to perform any step (of the aforementioned embodiments ) which is the responsibility of the authentication system (or which may be optionally performed by the authentication system).
[0021] According to a tenth embodiment, computer-readable non-transitory storage media comprise a computer program according to the ninth embodiment. Thus the tenth embodiment can consist for example of a hard disk (for example magnetic, optical or SSD) of a secure storage system according to an embodiment and a memory (for example of ROM, Flash or EEPROM type). a smart card according to one embodiment, or a hard disk (for example magnetic, optical or SSD) of an authentication system according to an embodiment and a memory (for example of ROM, Flash or EEPROM type) ) of a smart card according to one embodiment, or a hard disk (for example magnetic, optical or SSD) of an authentication system according to one embodiment, a hard disk (for example magnetic, optical or SSD) of a secure storage system according to an embodiment and a memory (for example of the ROM, Flash or EEPROM type) of a smart card according to one embodiment. Each storage medium stores the relevant part that concerns it. The memory of the smart card thus stores the sub-programs of the smart card for the implementation of the method according to embodiments of the invention, the hard disk of the authentication system stores the subroutines executed by the system. method for carrying out the method according to embodiments of the invention, and the hard disk of the secure storage system stores the sub-programs executed by the secure storage system for carrying out the method according to embodiment of the invention. According to an eleventh embodiment, a secure storage system S _SYS (which is a hardware system, and not purely virtual) is arranged to calculate a first hash R_H1 from a source code O_SRC, said source code 0 _SRC corresponding to an O_EXE binary code. This calculation can be performed by an electronic circuit of the secure storage system, such as an electronic circuit comprising a microprocessor and an associated memory, this associated memory containing a computer program suitable for performing this calculation. The electronic circuit may also be a dedicated electronic circuit, made for example using an FPGA, an ASIC, a micro-coded circuit, a PAL, a GAL, a PLA , a SPLD, a CPLD of an EPLD, or any form of appropriate wired logic.
[0022] The secure storage system S_SYS is arranged to store the first hash R_H1 and the binary code O_EXE in the smart card SC. This storage operation can be performed by an electronic circuit of the secure storage system, such as an electronic circuit comprising a microprocessor and an associated memory, this associated memory containing a computer program suitable for performing this storage. The electronic circuit may also be a dedicated electronic circuit, made for example using an FPGA, an ASIC, a micro-coded circuit, a PAL, a GAL, a PLA , a SPLD, a CPLD of an EPLD, or any form of appropriate wired logic. The electronic circuit may include network interfaces or other types of electronic communication interfaces (such as a communication interface with a smart card).
[0023] The secure storage system S_SYS is arranged to transmit to an authentication system A_SYS a random number P_RND and a third hash R _ H3, the third hash R _H3 being calculated from a concatenation of the first hash R_H1, a second hash R_H2 and the random number P_RND, the second hash R_H2 being calculated from the binary code 0 _EXE. This transmission and these calculations can be performed by an electronic circuit of the secure storage system, such as an electronic circuit comprising a microprocessor and an associated memory, this associated memory containing a computer program suitable for carrying out these transmissions and calculations. The electronic circuit may also be a dedicated electronic circuit, made for example using an FPGA, an ASIC, a micro-coded circuit, a PAL, a GAL, a PLA , a SPLD, a CPLD of an EPLD, or any form of appropriate wired logic. The electronic circuit may include network interfaces or other types of electronic communication interfaces.
[0024] According to a possible implementation of the eleventh embodiment, the secure storage system S_SYS is (or includes) a system for electrical customization of smart cards. Such a system comprises, in a known manner, a computer, chip card guidance systems (for example transmission belts), and electrical programming systems (contact or non-contact) for smart cards. According to a possible implementation of the eleventh embodiment, the secure storage system S_SYS comprises (possibly in addition to the aforementioned electrical customization system) an application development system (comprising for example a software development environment and a compiler) from which the original source code is produced. This source code can thus be generated inside the secure storage system (but, as a possible alternative, it is generated outside the secure storage system and is then transmitted to it to allow the calculation of the first hash R_H1) . According to a possible implementation of the eleventh embodiment, the secure storage system S_SYS is arranged to implement a method according to one of the first, second or third embodiments. To this end, it may comprise one (or more) electronic circuit (s) comprising a microprocessor and an associated memory, this associated memory containing a computer program suitable for implementing said methods (in combination, the case appropriate, with a computer program executed by the smart card). Each electronic circuit may be, as an alternative, a dedicated electronic circuit, made for example using an FPGA, an ASIC, a micro-coded circuit, a PAL, a GAL, PLA, SPLD, CPLD of an EPLD, or any form of appropriate wired logic. The electronic circuit may include network interfaces or other types of electronic communication interfaces. A twelfth embodiment relates to an authentication system A_ SYS for the authentication of a binary code EXE_SC stored in a smart card SC. This system is a hardware system (and not purely virtual). It is arranged to obtain a third reference hash R_H3. This obtaining can be carried out using an electronic circuit (of the authentication system) comprising a microprocessor and an associated memory, this associated memory containing a computer program suitable for performing this obtaining. The electronic circuit may also be a dedicated electronic circuit, made for example using an FPGA, an ASIC, a micro-coded circuit, a PAL, a GAL, a PLA , a SPLD, a CPLD of an EPLD, or any form of appropriate wired logic. The electronic circuit may include network interfaces or other types of electronic communication interfaces.
[0025] The authentication system A_SYS is arranged to obtain a third effective hash E _H3 from a concatenation of a first hash R_H1, a second hash E _H2 and a random number RND, the first hash R _H1 being stored in the smart card SC, the second hash E_H2 being calculated from the binary code EXE_SC to authenticate. This obtaining can be carried out using an electronic circuit (of the authentication system) comprising a microprocessor and an associated memory, this associated memory containing a computer program suitable for performing this obtaining. The electronic circuit may also be a dedicated electronic circuit, made for example using an FPGA, an ASIC, a micro-coded circuit, a PAL, a GAL, a PLA , a SPLD, a CPLD of an EPLD, or any form of appropriate wired logic.
[0026] The authentication system A_SYS is arranged to authenticate the binary code EXE_SC on the basis of a comparison of a third reference hash R H3 and the third effective hash E H3. This comparison can be carried out using an electronic circuit (of the authentication system) comprising a microprocessor and an associated memory, this associated memory containing a computer program suitable for performing this comparison. The electronic circuit may also be a dedicated electronic circuit, made for example using an FPGA, an ASIC, a micro-coded circuit, a PAL, a GAL, a PLA , a SPLD, a CPLD of an EPLD, or any form of appropriate wired logic.
[0027] According to a possible implementation of the twelfth embodiment, the authentication system A_SYS is a smart card test machine. Such a machine may comprise a computer equipped with a reader (contact and / or contactless) smart cards, the computer comprising a storage medium (such as a hard disk) storing a computer program to test the map. The machine can be arranged to perform tests to validate the operation of the smart card, to identify the origin of an error (software or hardware) observed during use of the smart card, or to verify the security level of the smart card. According to a possible implementation of the twelfth embodiment, the authentication system A_SYS is arranged to implement a method according to one of the fourth, fifth, sixth or seventh embodiments. To this end, it may comprise one (or more) electronic circuit (s) comprising a microprocessor and an associated memory, this associated memory containing a computer program suitable for implementing said methods (in combination, the case appropriate, with a computer program executed by the smart card). Each electronic circuit may be, as an alternative, a dedicated electronic circuit, made for example using an FPGA, an ASIC, a micro-coded circuit, a PAL, a GAL, PLA, SPLD, CPLD of an EPLD, or any form of appropriate wired logic. The electronic circuit may include network interfaces or other types of electronic communication interfaces. According to a possible variant, the authentication system may delegate to the smart card the execution of a method according to one of the fourth, fifth, sixth or seventh embodiments.
[0028] According to a thirteenth embodiment, a system for securing a smart card SC comprises a secure storage system S_SYS according to the eleventh embodiment and an authentication system A_SYS according to the twelfth embodiment. This security system can thus implement a method according to the eighth embodiment.
[0029] The invention is not limited to the embodiments described above by way of example; it extends to other variants. The usable memories are not limited to the examples given for purely illustrative purposes but cover any type of functionally equivalent memory. The embodiments described in connection with the method according to the invention can be transposed to the systems, as well as computer programs and storage media according to the invention, and vice versa.
权利要求:
Claims (13)
[0001]
REVENDICATIONS1. A method for securely storing a binary code (O_EXE) in a chip card (SC), comprising: / a / calculating, by a secure storage system (S_SYS), a first hash (R_H1) from a a source code (O_SRC), said source code (O_SRC) corresponding to the binary code (O_EXE); / b / storing, by the secure storage system (S_SYS), the first hash (R_H1) and the binary code (O_EXE) in the smart card (SC); / c / the transmission, by the secure storage system (S_SYS) to an authentication system (A_SYS), of a random number (P_RND) and a third hash (R_H3), the third hash (R_H3) being calculated from a concatenation of the first hash (R_H1), a second hash (R_H2) and the random number (P_RND), the second hash (R_H2) being calculated from the binary code (O_EXE).
[0002]
2. Secure storage method according to claim 1, comprising the storage, by the secure storage system (S_SYS), the random number (P_RND) in the smart card (SC).
[0003]
3. Secure storage method according to any one of the preceding claims, comprising the storage in the smart card (SC), by the secure storage system (S_SYS), of at least one of the second hash (R_H2) and the third hash (R_H3).
[0004]
4. A method for authenticating a binary code (EXE _SC) stored in a smart card (SC), comprising: / d / obtaining, by an authentication system (A_SYS), a third hash of reference (R_H3); / e / obtaining, by the authentication system (A_SYS), a third effective hash (E_H3) from a concatenation of a first hash (R_H1), a second hash (E_H2) and dh a random number (RND), the first hash (R_H1) being stored in the smart card (SC), the second hash (E_H2) being calculated from the binary code (EXE_SC) to be authenticated; / f / authentication, by the authentication system (A_SYS), of the binary code (EXE_SC) based on a comparison of a third reference hash (R_H3) and the third effective hash (E_H3).
[0005]
5. Authentication method according to claim 4, comprising the transmission of the random number (RND) by the authentication system (A_SYS) to the smart card (SC).
[0006]
6. Authentication method according to any one of claims 4 and 5, the random number (RND) being a predetermined random number (P_RND) received by the authentication system (A_SYS), obtaining, by the system d authentication (A_SYS) of the third reference hash (R_H3) comprising the reception, by the authentication system (A_SYS), of the third reference hash (R_H3).
[0007]
7. Authentication method according to any one of claims 4 and 5, comprising a random number selection (RND) by the authentication system (A_SYS) and the reading of the first hash (R_H1) stored in the smart card. (SC) by the authentication system (A_SYS), obtaining, by the authentication system (A_SYS), the third reference hash (R_H3) comprising the calculation of the third reference hash (R_H3) by the system of authentication. authentication (A_SYS).
[0008]
8. A method for securing a smart card (SC) comprising a secure storage method according to one of claims 1 to 3 and an authentication method according to one of claims 4 to 7.
[0009]
9. Computer program comprising sequences of instructions implementing the steps of the method according to one of claims 1 to 8 when executed by processors.
[0010]
10. Computer-readable non-transit storage media comprising a computer program according to claim 9.
[0011]
11. Secure storage system (S_SYS), the secure storage system (S_SYS) being arranged to calculate a first hash (R_H1) from a source code (O_SRC), said source code (O_SRC) corresponding to a binary code (O_EXE); the secure storage system (S_SYS) being arranged to store the first hash (R_H1) and the binary code (O_EXE) in the smart card (SC); the secure storage system (S_SYS) being arranged to transmit to an authentication system (A_SYS) a random number (P_RND) and a third hash (R_H3), the third hash (R_H3) being calculated from a concatenation of the first hash (R_H1), a second hash (R_H2) and the random number (P_RND), the second hash (R_H2) being calculated from the binary code (O_EXE).
[0012]
12. Authentication system (A_SYS) for the authentication of a binary code (EXE_SC) stored in a smart card (SC), the authentication system (A_SYS) being arranged to obtain a third reference hash (R_H3 ); the authentication system (A_SYS) being arranged to obtain a third effective hash (E_H3) from a concatenation of a first hash (R_H1), a second hash (E_H2) and a random number (RND ), the first hash (R_H1) being stored in the smart card (SC), the second hash (E_H2) being calculated from the binary code (EXE_SC) to authenticate; the authentication system (A_SYS) being arranged to authenticate the binary code (EXE_SC) on the basis of a comparison of a third reference hash (R_H3) and the third effective hash (E_H3).
[0013]
13. Security system for a smart card (SC) comprising a secure storage system (S_SYS) according to claim 11 and an authentication system (A_SYS) according to claim 12.
类似技术:
公开号 | 公开日 | 专利标题
EP3033857B1|2018-07-11|Binary code authentication
FR3041195A1|2017-03-17|METHOD OF ACCESSING ONLINE SERVICE USING SECURE MICROCIRCUIT AND SECURITY TOKENS RESTRICTING THE USE OF THESE TOKENS TO THEIR LEGITIMATE HOLDER
WO2013021107A1|2013-02-14|Method, server and system for authentication of a person
FR2989799A1|2013-10-25|METHOD FOR TRANSFERRING A DEVICE TO ANOTHER RIGHTS OF ACCESS TO A SERVICE
EP3665609B1|2021-08-25|Method and server for certifying an electronic document
FR3013541A1|2015-05-22|METHOD AND DEVICE FOR CONNECTING TO A REMOTE SERVICE
EP2772869B1|2017-07-19|Method and system for cryptographic processing using sensitive data
EP3136354B1|2020-05-06|Method for securing and ensuring the auditability of an electronic vote
EP3446436B1|2021-01-13|Method for obtaining a security token by a mobile terminal
WO2019129937A1|2019-07-04|Checking the integrity of an electronic device
EP3136283B1|2020-12-16|Device and method for securing commands exchanged between a terminal and an integrated circuit
EP1436792B1|2007-11-21|Authentication protocol with memory integrity verification
EP2933767B1|2019-06-05|Method for deactivating a payment module, corresponding computer program product, storage medium and payment module
FR2923041A1|2009-05-01|METHOD OF OPENING SECURED TO THIRDS OF A MICROCIRCUIT CARD.
FR3060166A1|2018-06-15|METHOD FOR ACCESSING SHARED DATA IN A FILE ARBORESCENCE MANAGED BY A FILE SYSTEM USING A HERITAGE MECHANISM
EP2252978B1|2017-05-03|Integrated circuit card having a modifiable operating program and corresponding method of modification
FR2807245A1|2001-10-05|METHOD FOR PROTECTING AN ELECTRONIC CHIP AGAINST FRAUD
FR3013868A1|2015-05-29|METHOD FOR SECURELY TRANSMITTING AN IMAGE FROM AN ELECTRONIC IDENTITY DOCUMENT TO A TERMINAL
EP2280380A1|2011-02-02|Method for customising an electronic entity, and electronic entity implementing this method
FR3091767A1|2020-07-17|Authorization to load an application in a security element.
WO2020193583A1|2020-10-01|Method for running secure code, corresponding devices, system and programs
FR3043232A1|2017-05-05|METHOD OF VERIFYING IDENTITY DURING VIRTUALIZATION
FR2835130A1|2003-07-25|METHOD FOR GENERATING AND VERIFYING ELECTRONIC SIGNATURES
FR3025959A1|2016-03-18|METHOD OF SECURING AN APPLICATION FOR REALIZING PROXIMITY TRANSACTIONS BETWEEN TWO TERMINALS
CA2969495A1|2016-06-09|Method implemented in an identity document and associated identity document
同族专利:
公开号 | 公开日
FR3015078B1|2017-03-31|
US10148440B2|2018-12-04|
WO2015091511A1|2015-06-25|
US20160380771A1|2016-12-29|
EP3033857A1|2016-06-22|
EP3033857B1|2018-07-11|
引用文献:
公开号 | 申请日 | 公开日 | 申请人 | 专利标题
US6588673B1|2000-02-08|2003-07-08|Mist Inc.|Method and system providing in-line pre-production data preparation and personalization solutions for smart cards|
WO2006039364A2|2004-10-01|2006-04-13|Solidus Networks, Inc. D/B/A/ Pay By Touch|System and method for electronic check verification over a network|
US7389426B2|2005-11-29|2008-06-17|Research In Motion Limited|Mobile software terminal identifier|
US8239686B1|2006-04-27|2012-08-07|Vudu, Inc.|Method and system for protecting against the execution of unauthorized software|
US20090198618A1|2008-01-15|2009-08-06|Yuen Wah Eva Chan|Device and method for loading managing and using smartcard authentication token and digital certificates in e-commerce|KR101482700B1|2013-09-27|2015-01-14|잉카엔트웍스|Method For Verifying Integrity of Program Using Hash|
US9965639B2|2015-07-17|2018-05-08|International Business Machines Corporation|Source authentication of a software product|
CN106789002B|2016-12-14|2019-11-15|长沙理工大学|A kind of EEID mark generating method of identity-based information|
US10162629B1|2017-06-02|2018-12-25|Vmware, Inc.|Compiler independent identification of application components|
法律状态:
2015-11-23| PLFP| Fee payment|Year of fee payment: 3 |
2016-11-21| PLFP| Fee payment|Year of fee payment: 4 |
2017-11-21| PLFP| Fee payment|Year of fee payment: 5 |
2018-11-27| PLFP| Fee payment|Year of fee payment: 6 |
2020-10-16| ST| Notification of lapse|Effective date: 20200910 |
优先权:
申请号 | 申请日 | 专利标题
FR1362677A|FR3015078B1|2013-12-16|2013-12-16|BINARY CODE AUTHENTICATION|FR1362677A| FR3015078B1|2013-12-16|2013-12-16|BINARY CODE AUTHENTICATION|
PCT/EP2014/077999| WO2015091511A1|2013-12-16|2014-12-16|Binary code authentication|
US15/104,938| US10148440B2|2013-12-16|2014-12-16|Binary code authentication|
EP14814839.8A| EP3033857B1|2013-12-16|2014-12-16|Binary code authentication|
[返回顶部]